<?php
$this_dir = dirname(__FILE__) . '/';
require $this_dir . '../../common/auto_load.php';
$script_name = $_SERVER['SCRIPT_NAME'];

function output($data)
{
	header('Content-Type: application/json; charset=UTF-8');
	echo Common::decodeUnicode(json_encode($data));
}

$v = array(
	'result' => 'success',
	'result_detail' => '',
	'data' => array()
);

if(0 < preg_match('/\/.*\/products\/.*\/basic\/$/', $script_name))
{
	require $this_dir . 'get_products_basic.php';
	exit;
}

//http://api.shaixuan.org/category/graphics_card/attributes/zh-cmn-Hans-CN/
if(0 < preg_match('/\/.*\/category\/.*\/attributes\/$/', $script_name))
{
	require $this_dir . 'get_product_attribute_value_wlp.php';
	exit;
}

?>
